package com.zhq.bean;

/**
 * @Author:钟豪强
 * @Description:    前后端信息传输实体类
 * @Date Created in  2020-08-13 21:36
 * @Modified By:
 */
public class Message {
    //具体的JSON数据表示{status:0,result:"",data:{}}
    //消息状态码,0表示发生成功,-1表示发送失败
    private int status;
    //消息结果
    private String result;
    //消息数据内容
    private Object data;

    public Message(int status, String result, Object data) {
        this.status = status;
        this.result = result;
        this.data = data;
    }

    public Message(int status, String result) {
        this.status = status;
        this.result = result;
    }

    public Message() {
    }

    public Message(int status) {
        this.status = status;
    }

    public Message(String result) {
        this.result = result;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Message{" +
                "status=" + status +
                ", result='" + result + '\'' +
                ", data=" + data +
                '}';
    }
}
